﻿using ProTrack.Dto;
using ProTrack.Entity;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace ProTrack.IServices.Stock
{
    /// <summary>
    /// 生产退料接口
    /// </summary>
    public interface IOrderProductReceiveServices
    {


        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="model">数据模型</param>
        /// <returns></returns>
        public Task<bool> AddAsync(OrderProductReceive model, List<OrderProductReceiveItem> list);


        /// <summary>
        /// 查询所有数据
        /// </summary>
        /// <returns></returns>
        public Task<IEnumerable<OrderProductReceive>> GetAllAsync();
        /// <summary>
        /// 分页获取
        /// </summary>
        /// <param name="PageIndex">当前页</param>
        /// <param name="PageSize">页大小</param>
        /// <param name="Number">生产退料编号</param>
        /// <param name="WarehouseId">仓库Id</param>
        /// <param name="Status">订单状态</param>
        /// <returns></returns>
        public Task<IEnumerable<OrderProductReceive>> GetAsync(int PageIndex, int PageSize, string Number, string WarehouseId,string Status);
        /// <summary>
        /// 获取总条数
        /// </summary>
        /// <param name="Number">生产退料编号</param>
        /// <param name="WarehouseId">仓库Id</param>
        /// <param name="Status">订单状态</param>
        /// <returns></returns>
        public Task<int> GetCountAsync(string Number, string WarehouseId, string Status);
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="model">数据模型</param>
        /// <param name="list">子数据集合</param>
        /// <returns></returns>
        public Task<bool> UpdateAsync(OrderProductReceive model, List<OrderProductReceiveItem> list);

        /// <summary>
        /// 批量删除
        /// </summary>
        /// <param name="Ids"></param>
        /// <returns></returns>
        public Task<bool> Delete(int[] Ids);
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        public Task<bool> Delete(int Id);


        /// <summary>
        /// 根据生产退料Id 返回产品数据
        /// </summary>
        /// <param name="OrderProductReceiveId">生产退料Id</param>
        /// <returns></returns>
        public Task<IEnumerable<OrderProductReceiveItemDto>> GetOrderProductReceiveItemById(string OrderProductReceiveId, string WareHouseId);


        /// <summary>
        /// 根据生产退料Id 返回产品数据
        /// </summary>
        /// <param name="OrderProductPickId">生产领料Id</param>
        /// <returns></returns>
        public Task<IEnumerable<OrderProductReceiveItemDto>> GetOrderProductPickItemById(string OrderProductPickId, string WareHouseId);



        /// <summary>
        /// 修改单据状态
        /// </summary>
        /// <param name="Id">单据Id</param>
        /// <param name="Status">状态：0待审核 1已审核</param>
        /// <returns></returns>
        public Task<bool> UpdateStatus(long id, int status);
    }
}
